- merge_request = local_assigns.fetch(:issuable)

- return unless merge_request.is_a?(MergeRequest)

- form = local_assigns.fetch(:form)
- project = merge_request.target_project

- return unless project&.feature_available?(:blocking_merge_requests)

.form-group.row.blocking-merge-requests
  = form.label :blocking_merge_request_references, _('Merge request dependencies'), class: 'col-12'
  .col-12
    .gl-mb-2
      = _("List the merge requests that must be merged before this one.")
      = link_to "Learn more.", url_helpers.help_page_url('user/project/merge_requests/dependencies.md', anchor: 'complex-merge-order-dependencies-are-unsupported')
  .col-12
    = text_field_tag 'blocking_merge_request_refs', nil,
                     class: 'form-control',
                     id: 'js-blocking-merge-requests-input',
                     data: { hidden_blocking_mrs_count: merge_request.hidden_blocking_merge_requests_count(current_user),
                             visible_blocking_mr_refs: merge_request.visible_blocking_merge_request_refs(current_user) }
  .col-12
    .gl-text-gray-500
      %p= _("References should be in the form of path/to/project!merge_request_id")
